Skip to content

feat: add package checksum tracking and re-extraction logic#193

Merged
OliverTrautvetter merged 9 commits intomainfrom
detect_different_installed_package
Feb 23, 2026
Merged

feat: add package checksum tracking and re-extraction logic#193
OliverTrautvetter merged 9 commits intomainfrom
detect_different_installed_package

Conversation

@OliverTrautvetter
Copy link
Member

Add the ability to download/install new builds of the same branch without cleaning up the oms-workdir first.

Clickup

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds package checksum tracking and automatic re-extraction logic to enable downloading and installing new builds of the same version/branch without manually cleaning up the oms-workdir first.

Changes:

  • Implements checksum tracking using sidecar .md5 files alongside downloaded packages and marker files within extracted directories
  • Adds automatic re-extraction logic when package checksums change, enabling seamless updates to new builds of the same version
  • Maintains backward compatibility by gracefully handling cases where checksum files don't exist

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/installer/package.go Adds checksum comparison functions and modifies Extract() to automatically re-extract when package checksums change
internal/installer/package_test.go Adds comprehensive test coverage for checksum tracking scenarios including checksum changes, missing markers, and backward compatibility
cli/cmd/download_package.go Saves MD5 checksums to sidecar files after successful package download and verification
cli/cmd/download_package_test.go Adds test to verify MD5 checksum sidecar file creation during package download

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@OliverTrautvetter OliverTrautvetter marked this pull request as ready for review February 17, 2026 14:12
Copy link
Member

@NautiluX NautiluX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, the whole file handling is a bit complicated and the extraction relies on the md5sum file being there, which means a user who deletes the md5sum file may run into problems (although users can always shoot themselves in the foot, of course).
See my comment, also happy to discuss in sync :)

Copy link
Member

@NautiluX NautiluX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to adjust it in the bootstrapping as well, I guess that part is missing tests? Probably we can abstract the package filename generation into a common function.

installCmd := fmt.Sprintf("oms-cli install codesphere -c /etc/codesphere/config.yaml -k %s/age_key.txt -p %s-%s%s",

Copy link
Member

@NautiluX NautiluX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :)

@OliverTrautvetter OliverTrautvetter merged commit 670ef72 into main Feb 23, 2026
6 checks passed
@OliverTrautvetter OliverTrautvetter deleted the detect_different_installed_package branch February 23, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants